<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:wh="http://java.sun.com/jsf/composite/webhib">

   <ui:composition template="../template.xhtml">
      <ui:define name="title">
         #{msg.title_register}
      </ui:define>

      <ui:define name="content">

         <f:event type="preRenderView" listener="#{reg.registerListener}"/>

         <div id="register-page" class="useradmin-page">
            <h1 class="page-header">#{msg.header_register}</h1>
            <wh:pageMessage bean="#{reg}"/>

            <h:panelGroup id="register-pane" styleClass="input-pane" layout="block" rendered="#{!reg.registered}">
               <h:form id="register-form" prependId="false">
                  <wh:inputField id="displayname" label="#{msg.field_displayname}" value="#{reg.displayName}" tabindex="1"/>
                  <wh:inputField id="email" label="#{msg.field_email}" value="#{reg.email}" tabindex="2"/>
                  <wh:inputField id="username" label="#{msg.field_username}" value="#{reg.userName}" tabindex="3"/>
                  <wh:inputSecret id="password" label="#{msg.field_password}" value="#{reg.passWord}" tabindex="4"/>
                  <wh:inputSecret id="passwordconfirm" label="#{msg.field_passwordconfirm}" value="#{reg.passWordConfirm}" tabindex="5"/>
                  <div class="text-post"><p>#{msg.text_register_remember}</p></div>
                  <wh:buttonPane>
                     <wh:inputButton id="register-button" action="#{reg.registerAction}" label="#{msg.action_register}" tabindex="6"/>
                  </wh:buttonPane>
               </h:form>
            </h:panelGroup>

            <h:panelGroup id="registered-pane" styleClass="input-pane" layout="block" rendered="#{reg.registered}">
               <h:form id="registered-form" prependId="false">
                  <div class="text-pre"><p>#{msg.text_register_ok}</p></div>
                  <wh:buttonPane>
                     <wh:inputButton id ="registered-continue-button" action="#{reg.registeredContinueAction}" label="#{msg.action_continue}" tabindex="1"/>
                  </wh:buttonPane>
               </h:form>
            </h:panelGroup>
         </div>

      </ui:define>
   </ui:composition>

</html>

